package org.estela.ml.dataset;

import java.util.Iterator;

import org.estela.stats.BasicStatistics;
import org.estela.stats.Frequencies;


public interface DataSet {

	/**
	 * 
	 * @param instance
	 */
	void updateStats(Instance instance);
	
	/**
	 * 
	 * @param attributeIdx
	 * @return
	 */
	Frequencies getFrequencies(int attributeIdx);
	
	/**
	 * 
	 * @param attributeIdx
	 * @return
	 */
	BasicStatistics getStats(int attributeIdx);
	
	/**
	 * 
	 * @param attributeIdx
	 * @return
	 */
	int missingCount(int attributeIdx);
	
	/**
	 * 
	 * @return
	 */
	int size();
	
	/**
	 * @return Returns all attributes.
	 */
	Attribute[] getAttributes();
	
	/**
	 * Returns the attribute given its name.
	 * @param name The attribute name
	 * @return Returns the attribute specified by the parameter.
	 */
	Attribute getAttributeByName(String name);
	
	/**
	 * 
	 * @return
	 */
	Iterator<Instance> iterator();

	Iterator<Attribute> attributeIterator();

	boolean containsAttribute(Attribute attribute);

	Instance getInstance(int idx);	
}